package com.shujia.day11;

/*
    public String substring(int start)
    public String substring(int start,int end)

 */
public class StringBufferDemo3 {
    public static void main(String[] args) {
        StringBuffer sb1 = new StringBuffer("hello world java hadoop");

        //public String substring(int start)
        String s1 = sb1.substring(4);
        System.out.println("sb1: "+sb1);
        System.out.println("s1: "+s1);

        //public String substring(int start,int end)
        String s2 = sb1.substring(6, 11);
        System.out.println("sb1: "+sb1);
        System.out.println("s2: "+s2);

    }
}
